import request from '@/utils/request'

//获取岗位列表
export function getPostList(data){
    return request({
        url: '/sysPost/list',
        method: 'post',
        data: data || {}
    })
}
//新增岗位
export function addPost(data){
    return request({
        url: '/sysPost/add',
        method: 'post',
        data: data || {}
    })
}
//编辑岗位
export function editPost(data){
    return request({
        url: '/sysPost/edit',
        method: 'put',
        data: data || {}
    })
}
//单条删除岗位
export function deletePost(postId){
    return request({
        url: `/sysPost/delete/${postId}`,
        method: 'delete',
    })
}
//批量删除岗位
export function batchDeletePost(data){
    return request({
        url: '/sysPost/batchDelete',
        method: 'delete',
        data: data || {}
    })
}
